@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

:root {
  /* Dark mode colors */
  --text-color: #E3E3E3;
  --subheading-color: #ffffff;
  --placeholder-color: #A6A6A6;
  --primary-color: #242424;
  --secondary-color: linear-gradient(45deg, #3f3251 20%, #00525f 100%);
  --secondary-hover-color: linear-gradient(65deg, #00525f 20%, #3f3251 100%);
}

.light_mode {
  /* Light mode colors */
  --text-color: #222;
  --subheading-color: #A0A0A0;
  --placeholder-color: #6C6C6C;
  --primary-color: #FFF;
  --secondary-color: #bcbfc4;
  --secondary-hover-color: #DBE1EA;
}

body {
  background: var(--primary-color);
}

.header, .chat-list .message, .typing-form {
  margin: 0 auto;
  max-width: 980px;
}

.header {
  margin-top: 6vh;
  padding: 1rem;
  overflow-x: hidden;
}

body.hide-header .header {
  margin: 0;
  display: none;
}

.header :where(.title, .subtitle) {
  color: var(--text-color);
  font-weight: 500;
  line-height: 4rem;
}

.header .title {
  width: fit-content;
  font-size: 3rem;
  font-family: "Tech";
  background-clip: text;
  background: linear-gradient(to right, #4285f4, #d96570);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header .subtitle {
  font-size: 2.2rem;
  font-weight: 300;
  color: var(--subheading-color);
}

.suggestion-list {
  width: 100%;
  height: 100%;
  list-style: none;
  display: flex;
  gap: 1.25rem;
  margin-top: 8.5vh;
  overflow: hidden;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.suggestion-list .suggestion {
  cursor: pointer;
  width: 222px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  border-radius: 25px;
  justify-content: space-between;
  background: #2c2d44;
  background-image: -moz-linear-gradient(45deg, #4b3c5f 2%, #00363f 100%);
  background-image: -webkit-linear-gradient(45deg, #4b3c5f 2%, #00363f 100%);
  background-image: linear-gradient(165deg, #4b3c5f 2%, #00363f 100%);
}

.suggestion-list .suggestion:hover {
  background-image: linear-gradient(165deg, #4b3c5f 30%, #004753 100%);
}

.suggestion-list .suggestion :where(.text, .icon) {
  font-weight: 400;
  color: rgb(255, 255, 255);
  text-shadow: 0 0 2px rgba(0, 0, 0, 1);

}

.suggestion-list .suggestion .icon {
  width: 42px;
  height: 42px;
  display: flex;
  font-size: 1.5rem;
  align-self: flex-end;
  align-items: center;
  border-radius: 50%;
  justify-content: center;
  color: rgb(255, 255, 255);
  text-shadow: 0 0 2px rgba(0, 0, 0, 1);
}

.chat-list {
  padding: 2rem 1rem 12rem;
  max-height: 100vh;
  overflow-y: auto;
}

.chat-list .message.incoming {
  margin-top: 2rem;
}

.chat-list .message .message-content {
  display: flex;
  width: 100%;
  border-radius: 10px;
  /* border-top-left-radius: 10px;
  border-top-right-radius: 10px; */
  background: #2c2d44;
  background-image: -moz-linear-gradient(45deg, #4b3c5f 2%, #00363f 100%);
  background-image: -webkit-linear-gradient(45deg, #4b3c5f 2%, #00363f 100%);
  background-image: linear-gradient(165deg, #4b3c5f 2%, #00363f 100%);
}

.chat-list .message .text {
  color: white;
  white-space: pre-wrap;
}

.chat-list .message.error .text {
  color: #e55865;
}

.chat-list .message.loading .text {
  display: none;
}

.chat-list .message .avatar {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 20%;
  margin: 20px;
}

.chat-list .message.loading .avatar {
  animation: rotate 3s linear infinite;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

.chat-list .message .icon {
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.2rem;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  background-image: linear-gradient(to top, #202020 0%, #272727 100%);
  
}

.chat-list .message .icon:hover {
  background-image: linear-gradient(to top,  #272727 0%, #474747 100%);
}

.chat-list .message .loading-indicator {
  display: none;
  gap: 0.8rem;
  width: 100%;
  flex-direction: column;
}

.chat-list .message.loading .loading-indicator {
  display: flex;
  justify-content: center;
}

.chat-list .message .loading-indicator .loading-bar {
  height: 8px;
  width: 100%;
  border-radius: 0.135rem;
  background-position: -800px 0;
  background: linear-gradient(to right, #4285f4, var(--primary-color), #4285f4);
  animation: loading 3s linear infinite;
}

.chat-list .message .loading-indicator .loading-bar:last-child {
  width: 70%;
}

@keyframes loading {
  0% {
    background-position: -800px 0;
  }

  100% {
    background-position: 800px 0;
  }
}

.typing-area {
  position: fixed;
  width: 100%;
  left: 0;
  bottom: 0;
  padding: 1rem;
  background-image: linear-gradient(165deg, #4b3c5f 2%, #00363f 100%);
}

.typing-area :where(.typing-form, .action-buttons) {
  display: flex;
  gap: 0.75rem;
}

.typing-form .input-wrapper {
  width: 100%;
  height: 56px;
  display: flex;
  position: relative;
}

.typing-form .typing-input {
  height: 100%;
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-size: 1rem;
  color: black;
  padding: 1.1rem 4rem 1.1rem 1.5rem;
  border-radius: 100px;
}

.typing-form .typing-input:focus {
  border-style: double;
  transition: 0.1s ease;
}

.typing-form .typing-input::placeholder {
  color: var(--placeholder-color);
}

.typing-area .icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  font-size: 1.4rem;
  color: black;
  align-items: center;
  justify-content: center;
  background: white;
  transition: 0.2s ease;
}

.typing-area .icon:hover {
  background-image: linear-gradient(to top, #ffffff 0%, #e2ebf0 100%);
  border-style: double;
  transition: 0.1s ease;
}

.typing-form #send-message-button {
  position: absolute;
  right: 0;
  outline: none;
  border: none;
  transform: scale(0);
  background: transparent;
  transition: transform 0.2s ease;
}

.typing-form .typing-input:valid ~ #send-message-button {
  transform: scale(1);
}

.typing-area .disclaimer-text {
  text-align: center;
  font-size: 0.85rem;
  margin-top: 1rem;
  color: var(--placeholder-color);
}

/* Responsive media query code for small screen */
@media (max-width: 768px) {
  .header :is(.title, .subtitle) {
    font-size: 2rem;
    line-height: 2.6rem;
  }

  .header .subtitle {
    font-size: 1.7rem;
  }

  .typing-area :where(.typing-form, .action-buttons) {
    gap: 0.4rem;
  }

  .typing-form .input-wrapper {
    height: 50px;
  }

  .typing-form .typing-input {
    padding: 1.1rem 3.5rem 1.1rem 1.2rem;
  }

  .typing-area .icon {
    height: 50px;
    width: 50px;
  }

  .typing-area .disclaimer-text {
    font-size: 0.75rem;
    margin-top: 0.5rem;
  }
}